Release 10.1A: OpenEdge Development:
ADM and SmartObjects


Standard ADM class files and templates

Each ADM class is supported by a set of standard class files of specific types: a primary include file, a property file, a super procedure, and a prototype file. These files, along with a set of templates, provide the basis for the standard SmartObjects available in the ADM. Each ADM class contains one standard class file of each type, but class files of the same type are set up differently for different classes. For example, the property file for the panel class is different from the property file for the viewer class. The standard class files for all ADM classes are in the %DLC%\src\adm2 (Windows) or $DLC/src/adm2 (UNIX) directory.

Table 1–1 describes the standard class files for each class. In the Filename column, type is a character string indicating the particular class; for example, view or viewer for the viewer class.

Table 1–1: Standard ADM class files 
File type
Filename
Description
Primary include file
type.i 
  • Starts the super procedure for the class.
  • Can initialize some properties.
  • References the property file.
  • Is referenced directly in a template or in another class’ primary include file.
  • References the custom primary include file, if relevant.
Property file
typeprop.i 
  • Defines properties.
  • References the prototype file.
  • Can define instance properties.
  • Can define the instance property dialog.
  • References the custom instance definition file, if relevant.
  • References the custom property file, if relevant.
Super procedure file
type.p 
  • Contains functions and internal procedures that define the behavior for the class.
  • References the property file.
  • Is run only once for the entire session.
  • References the custom exclude definition file, if relevant.
Prototype file
typeprto.i 
  • Defines prototypes for all internal entries (functions, internal procedures) of the super procedure for the class.

The type.i, typeprop.i, and type.p custom class files are described in the "Custom ADM Class Files" section.

For example, the following standard class files support the viewer class:

For examples of the contents of standard class files, see Appendix A "ADM Standard and Custom Class Files."

Templates

Unlike the standard class files, templates reside in the template subdirectory of the %DLC%\src\adm2 (Windows) or $DLC/src/adm2 (UNIX) directory. They are files that have at least a design-time visualization in the AppBuilder and, accordingly, have the suffix .w; for example, viewer.w. A SmartObject template serves as a basis for including a SmartObject in your application. Conceptually, it is a procedure file that serves as a general starting point for building one or more specific SmartObject masters (SmartObject external procedures).

A template contains very little code; generally, it contains only the following:

For a description of how SmartObject masters and templates relate, see the "SmartObject templates and masters" section . For an example of the contents of a template file, see Appendix A "ADM Standard and Custom Class Files."


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095